| Fully Qualified Name: | CodeIgniter\Database\QueryInterface |
Interface QueryInterface
Represents a single statement that can be executed against the database. Statements are platform-specific and can handle binding of binds.
| Name | Description | Defined By |
|---|---|---|
| getDuration() | Returns the duration of this query during execution, or null if the query has not been executed yet. | QueryInterface |
| getErrorCode() | Returns the error code created while executing this statement. | QueryInterface |
| getErrorMessage() | Returns the error message created while executing this statement. | QueryInterface |
| getQuery() | Returns the final, processed query string after binding, etal has been performed. | QueryInterface |
| hasError() | Reports whether this statement created an error not. | QueryInterface |
| isWriteType() | Determines if the statement is a write-type query or not. | QueryInterface |
| setDuration() | Records the execution time of the statement using microtime(true) for it's start and end values. If no end value is present, will use the current time to determine total duration. | QueryInterface |
| setError() | Stores the error description that happened for this query. | QueryInterface |
| setQuery() | Sets the raw query string to use for this statement. | QueryInterface |
| swapPrefix() | Swaps out one table prefix for a new one. | QueryInterface |
Returns the duration of this query during execution, or null if the query has not been executed yet.
| Parameter Name | Type | Description |
|---|---|---|
| $decimals | int | The |
Returns: string
Returns the error code created while executing this statement.
Returns: int
Returns the error message created while executing this statement.
Returns: string
Returns the final, processed query string after binding, etal has been performed.
Returns: mixed
Reports whether this statement created an error not.
Returns: bool
Determines if the statement is a write-type query or not.
Returns: bool
Records the execution time of the statement using microtime(true) for it's start and end values. If no end value is present, will use the current time to determine total duration.
| Parameter Name | Type | Description |
|---|---|---|
| $start | float | |
| $end | float |
Returns: mixed
Stores the error description that happened for this query.
| Parameter Name | Type | Description |
|---|---|---|
| $code | int | |
| $error | string |
Returns:
Sets the raw query string to use for this statement.
| Parameter Name | Type | Description |
|---|---|---|
| $sql | string | |
| $binds | mixed | |
| $setEscape | bool |
Returns: mixed
Swaps out one table prefix for a new one.
| Parameter Name | Type | Description |
|---|---|---|
| $orig | string | |
| $swap | string |
Returns: mixed